Optimal. Leaf size=175 \[ \frac {2^{\frac {1}{2}-\frac {p}{2}} F_1\left (\frac {1}{2} (1+2 m-p);\frac {1+p}{2},-n;\frac {1}{2} (3+2 m-p);\frac {1}{2} (1+\sin (e+f x)),-\frac {d (1+\sin (e+f x))}{c-d}\right ) \sec (e+f x) (g \sec (e+f x))^p (1-\sin (e+f x))^{\frac {1+p}{2}} (a+a \sin (e+f x))^{1+m} (c+d \sin (e+f x))^n \left (\frac {c+d \sin (e+f x)}{c-d}\right )^{-n}}{a f (1+2 m-p)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.27, antiderivative size = 175, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 35, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3005, 3000,
145, 144, 143} \begin {gather*} \frac {2^{\frac {1}{2}-\frac {p}{2}} \sec (e+f x) (1-\sin (e+f x))^{\frac {p+1}{2}} (a \sin (e+f x)+a)^{m+1} (g \sec (e+f x))^p (c+d \sin (e+f x))^n \left (\frac {c+d \sin (e+f x)}{c-d}\right )^{-n} F_1\left (\frac {1}{2} (2 m-p+1);\frac {p+1}{2},-n;\frac {1}{2} (2 m-p+3);\frac {1}{2} (\sin (e+f x)+1),-\frac {d (\sin (e+f x)+1)}{c-d}\right )}{a f (2 m-p+1)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 143
Rule 144
Rule 145
Rule 3000
Rule 3005
Rubi steps
\begin {align*} \int (g \sec (e+f x))^p (a+a \sin (e+f x))^m (c+d \sin (e+f x))^n \, dx &=\left ((g \cos (e+f x))^p (g \sec (e+f x))^p\right ) \int (g \cos (e+f x))^{-p} (a+a \sin (e+f x))^m (c+d \sin (e+f x))^n \, dx\\ &=\frac {\left (\sec (e+f x) (g \sec (e+f x))^p (a-a \sin (e+f x))^{\frac {1+p}{2}} (a+a \sin (e+f x))^{\frac {1+p}{2}}\right ) \text {Subst}\left (\int (a-a x)^{\frac {1}{2} (-1-p)} (a+a x)^{m+\frac {1}{2} (-1-p)} (c+d x)^n \, dx,x,\sin (e+f x)\right )}{f}\\ &=\frac {\left (2^{-\frac {1}{2}-\frac {p}{2}} \sec (e+f x) (g \sec (e+f x))^p (a-a \sin (e+f x))^{-\frac {1}{2}-\frac {p}{2}+\frac {1+p}{2}} \left (\frac {a-a \sin (e+f x)}{a}\right )^{\frac {1}{2}+\frac {p}{2}} (a+a \sin (e+f x))^{\frac {1+p}{2}}\right ) \text {Subst}\left (\int \left (\frac {1}{2}-\frac {x}{2}\right )^{\frac {1}{2} (-1-p)} (a+a x)^{m+\frac {1}{2} (-1-p)} (c+d x)^n \, dx,x,\sin (e+f x)\right )}{f}\\ &=\frac {\left (2^{-\frac {1}{2}-\frac {p}{2}} \sec (e+f x) (g \sec (e+f x))^p (a-a \sin (e+f x))^{-\frac {1}{2}-\frac {p}{2}+\frac {1+p}{2}} \left (\frac {a-a \sin (e+f x)}{a}\right )^{\frac {1}{2}+\frac {p}{2}} (a+a \sin (e+f x))^{\frac {1+p}{2}} (c+d \sin (e+f x))^n \left (\frac {a (c+d \sin (e+f x))}{a c-a d}\right )^{-n}\right ) \text {Subst}\left (\int \left (\frac {1}{2}-\frac {x}{2}\right )^{\frac {1}{2} (-1-p)} (a+a x)^{m+\frac {1}{2} (-1-p)} \left (\frac {a c}{a c-a d}+\frac {a d x}{a c-a d}\right )^n \, dx,x,\sin (e+f x)\right )}{f}\\ &=\frac {2^{\frac {1}{2}-\frac {p}{2}} F_1\left (\frac {1}{2} (1+2 m-p);\frac {1+p}{2},-n;\frac {1}{2} (3+2 m-p);\frac {1}{2} (1+\sin (e+f x)),-\frac {d (1+\sin (e+f x))}{c-d}\right ) \sec (e+f x) (g \sec (e+f x))^p (1-\sin (e+f x))^{\frac {1+p}{2}} (a+a \sin (e+f x))^{1+m} (c+d \sin (e+f x))^n \left (\frac {c+d \sin (e+f x)}{c-d}\right )^{-n}}{a f (1+2 m-p)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(852\) vs. \(2(175)=350\).
time = 8.82, size = 852, normalized size = 4.87 \begin {gather*} \frac {2 F_1\left (\frac {1-p}{2};1+m+n-p,-n;\frac {3-p}{2};-\tan ^2\left (\frac {1}{4} (2 e-\pi +2 f x)\right ),-\frac {(c-d) \tan ^2\left (\frac {1}{4} (2 e-\pi +2 f x)\right )}{c+d}\right ) \cos \left (\frac {1}{4} (2 e+\pi +2 f x)\right ) (g \sec (e+f x))^p (a (1+\sin (e+f x)))^m (c+d \sin (e+f x))^n \sin \left (\frac {1}{4} (2 e+\pi +2 f x)\right )}{f \left (-F_1\left (\frac {1-p}{2};1+m+n-p,-n;\frac {3-p}{2};-\tan ^2\left (\frac {1}{4} (2 e-\pi +2 f x)\right ),-\frac {(c-d) \tan ^2\left (\frac {1}{4} (2 e-\pi +2 f x)\right )}{c+d}\right )+\frac {2 (1-p) \left (-\frac {(c-d) n F_1\left (\frac {3-p}{2};1+m+n-p,1-n;\frac {5-p}{2};-\tan ^2\left (\frac {1}{4} (2 e-\pi +2 f x)\right ),-\frac {(c-d) \tan ^2\left (\frac {1}{4} (2 e-\pi +2 f x)\right )}{c+d}\right )}{c+d}+(1+m+n-p) F_1\left (\frac {3-p}{2};2+m+n-p,-n;\frac {5-p}{2};-\tan ^2\left (\frac {1}{4} (2 e-\pi +2 f x)\right ),-\frac {(c-d) \tan ^2\left (\frac {1}{4} (2 e-\pi +2 f x)\right )}{c+d}\right )\right ) \cot ^2\left (\frac {1}{4} (2 e+\pi +2 f x)\right )}{3-p}+p F_1\left (\frac {1-p}{2};1+m+n-p,-n;\frac {3-p}{2};-\tan ^2\left (\frac {1}{4} (2 e-\pi +2 f x)\right ),-\frac {(c-d) \tan ^2\left (\frac {1}{4} (2 e-\pi +2 f x)\right )}{c+d}\right ) \sin (e+f x)+\frac {d n F_1\left (\frac {1-p}{2};1+m+n-p,-n;\frac {3-p}{2};-\tan ^2\left (\frac {1}{4} (2 e-\pi +2 f x)\right ),-\frac {(c-d) \tan ^2\left (\frac {1}{4} (2 e-\pi +2 f x)\right )}{c+d}\right ) \cos ^2(e+f x)}{c+d \sin (e+f x)}-2 (n-p) F_1\left (\frac {1-p}{2};1+m+n-p,-n;\frac {3-p}{2};-\tan ^2\left (\frac {1}{4} (2 e-\pi +2 f x)\right ),-\frac {(c-d) \tan ^2\left (\frac {1}{4} (2 e-\pi +2 f x)\right )}{c+d}\right ) \sin ^2\left (\frac {1}{4} (2 e-\pi +2 f x)\right )+\frac {2 (c-d) n F_1\left (\frac {1-p}{2};1+m+n-p,-n;\frac {3-p}{2};-\tan ^2\left (\frac {1}{4} (2 e-\pi +2 f x)\right ),-\frac {(c-d) \tan ^2\left (\frac {1}{4} (2 e-\pi +2 f x)\right )}{c+d}\right ) \sin ^2\left (\frac {1}{4} (2 e-\pi +2 f x)\right )}{c+d \sin (e+f x)}\right )} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.23, size = 0, normalized size = 0.00 \[\int \left (g \sec \left (f x +e \right )\right )^{p} \left (a +a \sin \left (f x +e \right )\right )^{m} \left (c +d \sin \left (f x +e \right )\right )^{n}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int {\left (\frac {g}{\cos \left (e+f\,x\right )}\right )}^p\,{\left (a+a\,\sin \left (e+f\,x\right )\right )}^m\,{\left (c+d\,\sin \left (e+f\,x\right )\right )}^n \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________